package cn.tedu.oa_system.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @Author MW
 * @Description table name Dept
 * @CreateDate 2022/12/25
 */
@TableName(value ="dept")
@Data
public class Dept implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private Long deptId;

    private Integer deptmanager;

    private String deptAddr;

    private String deptName;

    private String deptFax;

    private String deptTel;

    private String email;

    private Date endTime;

    private Date startTime;

    @Override
    public String toString() {
        return "Dept{" +
                "deptId=" + deptId +
                ", deptManager=" + deptmanager +
                ", deptAddress='" + deptAddr + '\'' +
                ", deptName='" + deptName + '\'' +
                ", deptFax='" + deptFax + '\'' +
                ", deptTel='" + deptTel + '\'' +
                ", email='" + email + '\'' +
                ", endTime=" + endTime +
                ", startTime=" + startTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Dept dept = (Dept) o;
        return Objects.equals(deptId, dept.deptId) && Objects.equals(deptmanager, dept.deptmanager) && Objects.equals(deptAddr, dept.deptAddr) && Objects.equals(deptName, dept.deptName) && Objects.equals(deptFax, dept.deptFax) && Objects.equals(deptTel, dept.deptTel) && Objects.equals(email, dept.email) && Objects.equals(endTime, dept.endTime) && Objects.equals(startTime, dept.startTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(deptId, deptmanager, deptAddr, deptName, deptFax, deptTel, email, endTime, startTime);
    }
}
